package com.permission.controller;


import com.permission.annotation.PermissionCheck;
import com.permission.exception.NoPermissionException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by niuniu on 2017/4/14.
 */
@RestController
public class CompanyController {

    @RequestMapping(value = "/hello")
    @PermissionCheck("user:update")
    public String hello(){
        System.out.println("来了去吧");
        return "helloworld";
        //throw new NoPermissionException("hello");
    }


    @RequestMapping(value = "/wgetPGUser11")
    public String getPGUser() {

        return "MySQL2 Data: " + "=======".toString();
    }

}